Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package type #130

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Package type #130

wants to merge 3 commits into from

Conversation

saas786
Copy link

@saas786 saas786 commented Jun 21, 2020

Fixes: #109

In rare situations, if you have theme / plugin with same slug, it can cause issue, which is saved / generated later will overwrite the existing package (specially if version is same).

So this patch will try to avoid such situations.
on windows / wamp server, this throws the issue if file is downloaded directly from dashboard, so this workaround allows for proper download
Copy link

@lkraav lkraav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to break all existing installations, as-in require a change their composer.json for new vendor? If yes, it's probably not going to fly. This package type business probably needs to be an opt-in kind of a thing somehow.

@@ -35,7 +35,18 @@ class FileBody implements ResponseBody {
* @throws InvalidFileName If the file name fails validation.
*/
public function __construct( string $filename ) {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably not be changing coding style, remove space-only changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed empty-line change.

src/Release.php Outdated
$this->get_package()->get_slug(),
'/satispress/%s/%s/%s',
$package_type,
$this->get_package()->get_slug(),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent problem.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed indent issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.4.1: Repository/Installed{Plugins,Themes}::all() overwrite keys when plugins and themes slugs match
2 participants